import { Component, Input, OnInit, AfterViewInit, ViewChild, TemplateRef, Renderer2 } from '@angular/core';

@Component({
    selector: 'app-dg-data-tpl',
    template:
`<tbody>
    <tr class="dx-row dx-data-row dx-row-lines dx-column-lines">
        <td role="gridcell">
            <button (onClick)="expandDataRows($event)">data</button>
            <div>{{rowInfo?.data?.ID}}</div>
        </td>
    </tr>
</tbody>`,
})
export class DataGridDataTplComponent {

    @Input()
    rowInfo: any;

    public expandDataRows() {
        console.log('----DataGridDataTplComponent---expandDataRows');
    }
}



@Component({
    selector: 'app-dg-label-tpl',
    template:
`<tbody>
    <tr class="dx-row dx-data-row dx-row-lines dx-column-lines">
        <td role="gridcell">
            <button (onClick)="expandDataRows($event)">label</button>
            <div>{{rowInfo?.data?.ID}}</div>
        </td>
    </tr>
</tbody>`,
})
export class DataGridLabelTplComponent {

    @Input()
    rowInfo: any;

    public expandDataRows() {
        console.log('----DataGridLabelTplComponent---expandDataRows');
    }
}
